package edu.its.dreamteam.web.components;

import org.apache.tapestry.MarkupWriter;
import org.apache.tapestry.annotations.Parameter;
import org.apache.tapestry.ioc.annotations.Inject;

import edu.its.dreamteam.daf.beans.Position;
import edu.its.dreamteam.daf.dao.IPositionDao;

public class OutputPosition {
	@Parameter
    private String idPosition;
	@Inject
	private IPositionDao positionDao;
	
	public IPositionDao getPositionDao() {
		return positionDao;
	}
	void beginRender(MarkupWriter writer)
    {
		Position position = (Position) getPositionDao().findByPrimaryKey(idPosition);
        writer.write(position.getPosition());
    }
}
